package org.ljy.logisticsservice.listener;

import org.ljy.logisticsservice.Constant.Constants;
import org.ljy.orderservice.model.OrderInfo;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@RabbitListener(queues = Constants.WORK_ORDER)
@Component
public class OrderCreateListener {


    @RabbitHandler
    public void ListenerQueue1 (String message) {
        System.out.println("1:已收到订单消息:"+message);
    }

    @RabbitHandler
    public void ListenerQueue2(OrderInfo orderInfo) {
        System.out.println("2:已收到订单消息:"+orderInfo);
    }
}
